<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <!--引入Vue-->
  <script type="text/javascript" src="../js/vue.js"></script>
  <title>键盘事件</title>
</head>

<body>
  <div id="root">
    <h1>学校名字{{name}}</h1>
    <!--还有一个keydown-->
    <input type="text" placeholder="回车提示" @keyup.delete="showInfo">
  </div>

  <script type="text/javascript">
    Vue.config.productionTip=false

    let data={
      name:'尚硅谷',
      address:'就这样'
    }

    const vm=new Vue({
      el:'#root',
      data,
      methods:{
        showInfo(e)
        {
         alert(e.target.value)
        }
      }
    })
  </script>
</body>

</html>